/*
 * $Id$
 *
 * Copyright 2008 HuangHuang. All rights reserved.
 */

package com.crm.service;

import com.crm.model.Listbox;

import java.util.List;

/**
 * @author <a href="mailto:huang0510@hotmail.com">HuangHuang</a>
 * @version $Id$
 */
public interface IListboxService {

    /**
     * Get a listbox.
     *
     * @param listboxName The name of listbox class.
     * @return List The list of listbox.
     */
    List<Listbox> getList(String listboxName);

    /**
     * Create a listbox.
     *
     * @param listbox A instance of Listbox.
     */
    void create(Listbox listbox);

    /**
     * Create a listbox by class name.
     *
     * @param className The full name of class.
     * @param listName  The name of list item.
     * @throws Exception The exception maybe happen when create new instance.
     */
    void create(String className, String listName) throws Exception;

    /**
     * Update a listbox.
     *
     * @param listbox A instance of Listbox.
     */
    void update(Listbox listbox);

    /**
     * Delete a listbox.
     *
     * @param listbox A instance of Listbox.
     * @throws Exception The exception maybe happen when delete a list.
     */
    void delete(Listbox listbox) throws Exception;
}
